Skip to content

Conversation

@JohnRichard4096
Copy link
Member

@JohnRichard4096 JohnRichard4096 commented Oct 23, 2025

Sourcery 总结

更新插件版本,并通过设置 node_dict 和调用 __dump() 来改进 Nodelib 的初始化。

改进:

  • 在 Nodelib 构造函数中初始化 node_dict 属性并调用 __dump()

杂项:

  • pyproject.toml 中的项目版本更新到 0.1.1
Original summary in English

Summary by Sourcery

Bump plugin version and improve Nodelib initialization by setting up node_dict and invoking __dump()

Enhancements:

  • Initialize node_dict attribute and call __dump() in Nodelib constructor

Chores:

  • Update project version to 0.1.1 in pyproject.toml

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 23, 2025

审阅者指南(小型PR默认折叠)

审阅者指南

此PR更新了项目版本,并通过添加 node_dict 属性并在实例化时触发初始 dump 操作,增强了 NodeLib 的初始化器。

更新后的 NodeLib 初始化器类图

classDiagram
class NodeLib {
    permissions_data: dict
    node_dict: dict
    __init__(permissions_data=None)
    __str__()
    __dump()  
}
NodeLib : __init__() adds node_dict and calls __dump()
Loading

文件级更改

更改 详情 文件
提升插件版本
  • 将配置中的版本从 0.1.0 提升到 0.1.1
pyproject.toml
在 NodeLib 中初始化 node_dict 并调用 dump
  • __init__ 中将 self.node_dict 定义为空字典
  • 在初始化结束时调用 self.__dump()
src/nonebot_plugin_liteperm/nodelib.py

提示和命令

与 Sourcery 交互

  • 触发新审阅: 在拉取请求上评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 通过回复审阅评论,要求 Sourcery 从中创建一个 issue。你也可以回复审阅评论并带上 @sourcery-ai issue 来创建 issue。
  • 生成拉取请求标题: 随时在拉取请求标题的任意位置写上 @sourcery-ai 即可生成标题。你也可以在拉取请求上评论 @sourcery-ai title 来随时(重新)生成标题。
  • 生成拉取请求摘要: 随时在拉取请求正文的任意位置写上 @sourcery-ai summary 即可在你想要的位置生成 PR 摘要。你也可以在拉取请求上评论 @sourcery-ai summary 来随时(重新)生成摘要。
  • 生成审阅者指南: 在拉取请求上评论 @sourcery-ai guide 来随时(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在拉取请求上评论 @sourcery-ai resolve 来解决所有 Sourcery 评论。如果你已经处理了所有评论并且不想再看到它们,这会很有用。
  • 关闭所有 Sourcery 审阅: 在拉取请求上评论 @sourcery-ai dismiss 来关闭所有现有的 Sourcery 审阅。如果你想重新开始一个新审阅,这会特别有用——别忘了评论 @sourcery-ai review 来触发新审阅!

自定义你的体验

访问你的 仪表盘 以:

  • 启用或禁用审阅功能,例如 Sourcery 生成的拉取请求摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、删除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR updates the project version and enhances the NodeLib initializer by adding a node_dict attribute and triggering an initial dump on instantiation.

Class diagram for updated NodeLib initializer

classDiagram
class NodeLib {
    permissions_data: dict
    node_dict: dict
    __init__(permissions_data=None)
    __str__()
    __dump()  
}
NodeLib : __init__() adds node_dict and calls __dump()
Loading

File-Level Changes

Change Details Files
Bump plugin version
  • Increment version from 0.1.0 to 0.1.1 in configuration
pyproject.toml
Initialize node_dict and call dump in NodeLib
  • Define self.node_dict as an empty dictionary in init
  • Invoke self.__dump() at the end of initialization
src/nonebot_plugin_liteperm/nodelib.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你好 - 我已经审阅了你的修改,它们看起来很棒!


Sourcery 对开源项目免费 - 如果你喜欢我们的审阅,请考虑分享它们 ✨
帮助我变得更有用!请在每个评论上点击 👍 或 👎,我将利用这些反馈来改进你的审阅。
Original comment in English

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@JohnRichard4096 JohnRichard4096 merged commit 03f343a into main Oct 23, 2025
2 checks passed
@JohnRichard4096 JohnRichard4096 deleted the JohnRichard4096-patch-2 branch October 23, 2025 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants